<template>
  <div>
    <el-row>
      <el-col :span="24"><div class="grid-content bg-purple" style="text-align: center">
        <h2>角色管理</h2>
      </div></el-col>
    </el-row>
    <br>
    <Template :tableinfo="tableinfo" :tablebutton="tablebutton" :totalmsg="totalmsg" :button="button" :tabledate="tabledate" @init="init" identity="RoleManager" ></Template>
  </div>
</template>

<script>
import Template from "@/components/Template";

export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "RoleManager",
  components:{
    // eslint-disable-next-line vue/no-unused-components
    Template
  },
  data(){
    return{
      tabledate:[],
      totalmsg:10,

      tableinfo:[['角色名称',"roleName"]],
      tablebutton:['删除角色','查看角色权限','修改角色权限'],
      button:['添加新角色'],

    }
  },
  methods:{
    init(currentPage,pageSize){
      let url = "apj/role/selectOnePageRole/"+currentPage+"/"+pageSize
      this.$axios.get(url).then(r=>{
        let msg = r.data
        this.totalmsg = msg.count
        this.tabledate = msg.list
      })
    },
  }
}
</script>

<style scoped>

</style>
